package hcmut.edu.vn.greencloud;

import java.util.ArrayList;
import java.util.List;

import org.cloudbus.cloudsim.*;


public class Lease {
	public List<Vm> listVm = new ArrayList<Vm>();    // list of Vm
	public List<Cloudlet> tasks = new ArrayList<Cloudlet>();  // list of tasks 
	private String hardware ;  		// name of hardware
	private String software;   		// name of software
	private double arrivalTime ;  	// submit time of application 
	private double startTime;       // start time of application 
	private double durationTime;	// duration time of application 
	private double deadline;		// deadline of application 
	private boolean isOverdue;		// application can overdue or not ?
	private int leaseId;
	
	public Lease(
			int id,
			List<Vm> listVm,
			List<Cloudlet> tasks,
			String hardware,
			String softwaree,
			double arrivalTime,//arrivalTime
			double startTime,
			//releaseTime
			double durationTime,
			double deadline, 
			//duedate
			boolean isOverdue){
		this.leaseId = id;
		this.listVm = listVm;
		this.tasks = tasks;
		this.hardware = hardware;
		this.software = softwaree;
		this.arrivalTime = arrivalTime;
		this.startTime = startTime;
		this.durationTime = durationTime;
		this.deadline = deadline;
		this.isOverdue = isOverdue;
		
	}
	
	
	public Lease() {
		super();
		// TODO Auto-generated constructor stub
	}


	public void setListVm(List<Vm> listVm){
		this.listVm = listVm;
	}
	
	public List<Vm> getListVm(){
		return listVm;
	}
	
	public void setTasks(List<Cloudlet> tasks){
		this.tasks = tasks;
	}
	
	public List<Cloudlet> getTasks(){
		return tasks;
	}
	
	public void setSoftware(String software){
		this.software = software;
	}
	
	public String getSoftware(){
		return software;
	}

	public void setHardware(String hardware){
		this.hardware = hardware;
	}
	
	public String getHardware(){
		return hardware;
	}
	
	public void setarrivalTime(double arrivalTime){
		this.arrivalTime = arrivalTime;
	}
	
	public double getarrivalTime(){
		return arrivalTime;
	}
	
	public void setStartTime(double startTime){
		this.startTime = startTime;
	}
	
	public double getStartTime(){
		return startTime;
	}
	
	public void setDurationTime(double durationTime){
		this.durationTime = durationTime;
	}
	
	public double getDurationTime(){
		return durationTime;
	}
	
	public void setDeadline(double deadline){
		this.deadline = deadline;
	}
	
	public double getDeadline(){
		return deadline;
	}
	
	public void setisOverdue(boolean overdue){
		this.isOverdue = overdue;
	}
	
	public boolean getisOverdue(){
		return isOverdue;
	}


	public int getLeaseId() {
		return leaseId;
	}


	public void setLeaseId(int leaseId) {
		this.leaseId = leaseId;
	}
}
